import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'
import About from '../views/About.vue'
import Hospital from '../views/Hospital.vue'
import Interrogation from '../views/Interrogation.vue'
import Hosletter from '../views/Hosletter.vue'
import Medfood from '../views/Medfood.vue'
import Chinesemed from '../views/Chinesemed.vue'
import Fooddiet from '../views/Fooddiet.vue'
import Theculture from '../views/Theculture.vue'
import Hospital_stn from '../views/Hospital_stn.vue'
import Chengfruit from '../views/Chengfruit.vue'
import Tortoise from '../views/Tortoise.vue'
import Effective from '../views/Effective.vue'
import Deculture from '../views/Deculture.vue'
import Diseaseself from '../views/Diseaseself.vue'
import Westernmed from '../views/Westernmed.vue'
import Mfh from '../views/Mfh.vue'
import Comments_col from '../views/Comments_col.vue'
import Online_booking from '../views/Online_booking.vue'
import Folk_aly from '../views/Folk_aly.vue'
import Department from '../views/Department.vue'
import Hosletter_details from '../views/Hosletter_details.vue'
import Encymed_details from '../views/Encymed_details.vue'
import Folk from '../views/Folk.vue'
import Regimen from '../views/Regimen.vue'
import Mfh_more from '../views/Mfh_more.vue'
import About_copy from '../views/About_copy.vue'
import Fooddiet_pro from '../views/Fooddiet_pro.vue'
import Longdetail from '../views/Longdetail.vue'
Vue.use(VueRouter)
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
const routes = [
  //首页
  {
    path: '/',
    name: 'Index',
    component: Index
  },
  //中医药大全详情
  {
    path: '/About',
    name: 'About',
    component: About
  },
  //首页_医院概况详情
  {
    path: '/hospital/:id',
    name: 'Hospital',
    component: Hospital
  },
  //首页_问诊病例详情
  {
    path: '/interrogation/:id',
    name: 'Interrogation',
    component: Interrogation
  },
  //医讯快报查看更多
  {
    path: '/hosletter',
    name: 'Hosletter',
    component: Hosletter
  },
  //药食同源查看更多
  {
    path: '/medfood',
    name: 'Medfood',
    component: Medfood
  },
  //中医养生
  {
    path: '/index/yangsheng',
    name: 'Chinesemed',
    component: Chinesemed
  },
  //药膳食疗
  {
    path: '/index/yaoshan',
    name: 'Fooddiet',
    component: Fooddiet
  },
  //建党文化
  {
    path: '/index/dangjian',
    name: 'Theculture',
    component: Theculture
  },
  //医院概况
  {
    path: '/index/yiyuan',
    name: 'Hospital_stn',
    component: Hospital_stn
  },
  //玳瑁详情
  {
    path: '/tortoise',
    name: 'Tortoise',
    component: Tortoise
  },
  //凤眼果详情
  {
    path: '/chengfruit',
    name: 'Chengfruit',
    component: Chengfruit
  },
  //验方软件
  {
    path: '/index/yanfang',
    name: 'Effective',
    component: Effective
  },
  //建党文化查看详情
  {
    path: '/deculture/:id',
    name: 'Deculture',
    component: Deculture
  },
  //疾病自测
  {
    path: '/diseaseself',
    name: 'Diseaseself',
    component: Diseaseself
  },
  //疾病自测详情
  {
    path: '/westernmed',
    name: 'Westernmed',
    component: Westernmed
  },
  //药食同源详情
  {
    path: '/Mfh',
    name: 'Mfh',
    component: Mfh
  },
  //患者意见栏
  {
    path: '/index/yijian',
    name: 'Comments_col',
    component: Comments_col
  },
  //就医指南
  {
    path: '/index/yuyue',
    name: 'Online_booking',
    component: Online_booking
  },
  //民间方术副本
  {
    path: '/index/fangshu',
    name: 'Folk_aly',
    component:Folk_aly
  },
  //科室类别  Departments
  {
    path: '/index/jibing1',
    name: 'Department',
    component:Department
  
  },
  //医讯快报详情
  {
    path: '/Hosletter_details',
    name: 'Hosletter_details',
    component: Hosletter_details 
  },
  //中药方大全详情
  {
    path: '/Encymed_details/:id',
    name: 'Encymed_details',
    component: Encymed_details 
  },
  //民间方术查看详情
  {
    path: '/Folk/:id',
    name: 'Folk',
    component: Folk 
  },
  //中医养生查看详情
  {
    path: '/Regimen',
    name: 'Regimen',
    component: Regimen 
  },
  //药食同源查看更多详情
  {
    path: '/Mfh_more',
    name: 'Mfh_more',
    component: Mfh_more
  },
  //中医药大全副本
  {
    path: '/index/zhongyiyao',
    name: 'About_copy',
    component: About_copy

  },
  //药膳食疗详情
  {
    path: '/Fooddiet_pro',
    name: 'Fooddiet_pro',
    component:Fooddiet_pro

  },
  //曲阜工艺详情
  {
    path: '/longdetail/:id',
    name: 'Longdetail',
    component: Longdetail
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
